home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / deltaSystem.dcl < prev    next >
Encoding:
Modula Definition  |  1997-04-23  |  2.2 KB  |  78 lines  |  [TEXT/3PRM]

  1. definition module deltaSystem;
  2.  
  3. //    Version 0.8 to 1.0
  4.  
  5. //
  6. //    Operating System dependent constants and functions. 
  7. //
  8.  
  9. from StdString import String;
  10.  
  11. /*    Keyboard constants */
  12.  
  13. UpKey            :== '\036';        // Arrow up
  14. DownKey            :== '\037';        // Arrow down
  15. LeftKey            :== '\034';        // Arrow left
  16. RightKey        :== '\035';        // Arrow right
  17. PgUpKey            :== '\013';        // Page up
  18. PgDownKey        :==    '\014';        // Page down
  19. BeginKey        :== '\001';        // Begin of text
  20. EndKey            :== '\004';        // End of text
  21. BackSpKey        :== '\010';        // Backspace
  22. DelKey            :== '\177';        // Delete
  23. TabKey            :== '\011';        // Tab
  24. ReturnKey        :== '\015';        // Return
  25. EnterKey        :== '\003';        // Enter
  26. EscapeKey        :== '\033';        // Escape
  27. HelpKey            :== '\005';        // Help
  28.  
  29.  
  30. /*    File constants */
  31.  
  32. DirSeparator    :== ':';        // Separator between folder- and filenames in a pathname
  33.  
  34.  
  35. /*    Constants to check which of the Modifiers is down. */
  36.  
  37. ShiftOnly        :== (True,False,False,False);
  38. OptionOnly        :== (False,True,False,False);
  39. CommandOnly        :== (False,False,True,False);
  40. ControlOnly        :== (False,False,False,True);
  41.  
  42.  
  43. /* The functions HomePath and ApplicationPath prefix the
  44.    filename given to them with the full pathnames of the 'home'
  45.    and 'application' directory.
  46.    These functions have been added for compatibility with the
  47.    Sun version of the Clean system. In the 'home' directory
  48.    settings-files (containing preferences, options etc.) should
  49.    be stored. In the 'application' directory (i.e. the
  50.    directory in which the application resides) files that are
  51.    used read-only by the application (such as help files) should
  52.    be stored.
  53.    On the Macintosh these functions just return the filename
  54.    given to them, which means that the file will be stored in
  55.    the same folder as the application.
  56. */
  57.  
  58. HomePath        :: !String -> String;
  59. ApplicationPath    :: !String -> String;
  60.  
  61.  
  62. /*    Screen resolution functions. */
  63.  
  64. MMToHorPixels    :: !Real -> Int;
  65. MMToVerPixels    :: !Real -> Int;
  66. InchToHorPixels    :: !Real -> Int;
  67. InchToVerPixels    :: !Real -> Int;
  68.  
  69. /*    Maximum ranges of window PictureDomains:
  70.         MaxScrollWindowSize yields the range at which scrollbars
  71.             are inactive.
  72.         MaxFixedWindowSize yields the range at which the window
  73.             does not change into a ScrollWindow.
  74. */
  75.  
  76. MaxScrollWindowSize    :: (!Int, !Int);
  77. MaxFixedWindowSize    :: (!Int, !Int);
  78.